$(function(){
	var random = $("#ranGird");
		//初始化
		random.datagrid({
			url:'/student/dislist',
			fitColmuns:true,
			rownumbers:true,
			pagination : true,// 是否显示分页栏
			columns : [ [ {
				field : 'students',
				title : '学生',
				align : 'center',
				width : 110,
				formatter : function(val,rec){
					return rec.students.name;
				}
			}, {
				field : 'emp',
				title : '咨询师',
				align : 'center',
				width : 110,
				formatter : function(val,rec){
					return rec.emp.name;
				}
			}, {
				field : 'distributionTime',
				title : '分配时间',
				align : 'center',
				width : 120,
				formatter : function(val){
					var newTime = new Date(val);
					var year = newTime.getFullYear();  //获取年
			        var month = newTime.getMonth() + 1;    //获取月
			        var day = newTime.getDate(); //获取日
			        var hours = newTime.getHours(); 
			        var minutes = newTime.getMinutes();
			        var time = year + "-" + month + "-" + day + "" + " " + hours + ":" + minutes;
					return time;
				}
			} 
		] ]
		});
});